package com.baoxin.service;

import com.baoxin.dao.OrderDao;
import com.baoxin.domain.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: Rose
 * @Date: 2021/1/14 18:10
 * @version: 1.0.0
 */
@Service
@Transactional
public class OrderService {

    @Autowired
    private OrderDao orderDao ;

    public List<Order> findAllOrders() {
        List<Order> all = orderDao.findAll();
        return all;
    }

    public List<Order> findOrdersByIds(List<String> ids ) {
        List<Order> all = orderDao.findAllById(ids);
        return all;
    }
}
